<fly:block name="nohting_search">
	<div class="nohting_search"><fly:translate name='text_nohting_search'/></div>
</fly:block>
<fly:list name="list_category_map">	
	<tr onclick="document.location='<fly:variable name='url_category_map' />'" title="<fly:variable name='meta_title' />"
       	onmouseover="$(this).addClass('over');"
        onmouseout="$(this).removeClass('over');" >
		<td>   		
	   		<div class="place_width">
	   		   <fly:block name="block_place_photo">
	   				<div class="location_photo">
	   					<fly:list name="location_photo">
		   					<a rel="/<fly:variable name='image_preview' />" href="<fly:variable name='url_photo' />" class="preview"><img src="/<fly:variable name="src_photo" />" width="<fly:variable name="width" />" height="<fly:variable name="height" />" /></a>
		   				</fly:list>
	   				</div>
	   			</fly:block>
	   				<div title="<fly:variable name='meta_title' />" class="title_location">
				   		<fly:variable name="place_name" />
				   		<div class="block_title">
				   			<fly:variable name="place_description"/>
	  					</div>
	   				</div>
		   </div>
   		</td>
   		<td><span class="prix"><fly:variable name="price_sell" /></span></td>
		<td><span class="prix"><fly:variable name="price_rental" /></span></td>
		<td title="<fly:variable name='type_meta_title' />"><fly:variable name="real_estate" /></td>
	</tr>    		
</fly:list>
<script type="text/javascript">
this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.rel +"' alt='Image preview' />"+ c +"</p>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });	
	$("a.preview").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$(document).ready(function(){
	imagePreview();
});
</script>